package com.surprise.db.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.surprise.db.entity.Category;

public interface CategoryRepository extends JpaRepository<Category, Long> {

	@Query("select o from category o where o.type=?1 ") 
	public List<Category> query(int type);
	
	@Query("select o from category o where o.type=?1 and o.sequence=?2 ") 
	public Category query(int type,int sequence);
}
